# TriggerSwitchD, executes commands to activate/deactive remote switches.
# (c) Copyright 2010 Pontus Strömdahl, AdhocSkill. 
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


require 'rubygems'

SPEC = Gem::Specification.new do |s|
  s.name = "trigger_switch_d"
  s.version = "0.1.4"
  s.author = "Pontus Strömdahl"
  s.email = "pontus.stromdahl@adhocskill.com"
  s.homepage = "http://www.remote-trigger-switch.com/"
  s.platform = Gem::Platform::RUBY
  s.summary = "Daemon to execute schedule for remote devices"
  s.description = <<-EOS 
  Schedule remote triggered switches and dimmers to activate/deactivate the lights in your home.\n
  Type your schedule in plain text and have an USB connected tellstick send the appropriate commands,\n
  according to your schedule.
  EOS
  
  candidates = Dir.glob("{bin,config,samples,doc,lib}/**/*")
  candidates += ["LICENSE.txt","README.rdoc","COPYING.txt"]
  s.files = candidates.delete_if do |item|
    item.include?(".git")
  end
  s.bindir = "bin"
  s.executables = %W{tsd ts_teach ts_turn_on ts_turn_off ts_setup}
  s.require_path = "lib"
  s.has_rdoc = true
  s.extra_rdoc_files = ["LICENSE.txt","README.rdoc","COPYING.txt"]
  s.add_dependency("serialport", ">= 0.8.0")
  s.post_install_message = <<-EOS
******************************************************************
Thank you for installing trigger_switch_d. Run ts_setup to create a default filestructure neccessary to execute
the other ts_* applications. At the terminal prompt, type:

  ts_setup home
  
to create files in ~/.trigger_switch_d, or

  ts_setup root
  
to create files in /etc/trigger_switch_d. Enjoy trigger_switch_d

******************************************************************
  EOS
  
end